package com.streamer.app.utils.api


import com.streamer.app.bean.AnchorBean
import com.streamer.app.bean.CouponBean
import com.streamer.app.bean.CoursewareInfoBean
import com.streamer.app.bean.DrawBean
import com.streamer.app.bean.LiveBean
import com.streamer.app.bean.LiveUserBean
import com.streamer.app.bean.LoginBean
import com.streamer.app.bean.LotteryListBean
import com.streamer.app.bean.MessageBean
import com.streamer.app.bean.ProductDateBean
import com.streamer.app.bean.ReplayBean
import com.streamer.app.bean.UserInfoBean
import com.streamer.app.bean.liveProductBean
import com.streamer.app.utils.http.BaseResult
import com.streamer.app.utils.http.PageDataResult
import okhttp3.MultipartBody
import retrofit2.Call
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.Multipart
import retrofit2.http.POST
import retrofit2.http.Part
import retrofit2.http.Path
import retrofit2.http.Query
import java.io.File

interface UserApi {

    /**
     * login
     */
    @POST("/anchor/login")
    fun login(@Body params: @JvmSuppressWildcards Map<String, Any>): Call<BaseResult<LoginBean>>

    /**
     * 获取当前登录用户
     */
    @GET("/anchor/info")
    fun info(): Call<BaseResult<UserInfoBean>>

    /**
     * 查询直播详情
     */
    @GET("/anchor/live/getLiveInfo")
    fun getLiveInfo(): Call<BaseResult<LiveBean>>

    /**
     * 我的课件
     */
    @GET("/anchor/live/getMyCourseware")
    fun getMyCourseware(@Body params: @JvmSuppressWildcards Map<String, Any>):  Call<BaseResult<String>>

    /**
     * 开始直播
     */
    @GET("/anchor/live/startLive")
    fun startLive(): Call<BaseResult<Any>>

    /**
     * end直播
     */
    @GET("/anchor/live/endLive")
    fun endLive(): Call<BaseResult<String>>

    /**
     * 发布公告
     */
    @POST("/anchor/live/pushLiveNotice")
    fun pushLiveNotice(@Body params: @JvmSuppressWildcards Map<String, Any>): Call<BaseResult<String>>

    /**
     * 查询最新的公告信息
     */
    @GET("/anchor/live/getLastLiveNotice")
    fun getLastLiveNotice(): Call<BaseResult<Any?>>

    /**
     * 上传课件
     */
    @Multipart
    @POST("/anchor/live/uploadCourseware")
    fun uploadCourseware(
        @Part file: okhttp3.MultipartBody.Part
    ): Call<BaseResult<Any?>>
    /**
     * 获取课件信息
     */
    @GET("/anchor/live/getCoursewareInfo")
    fun getCoursewareInfo(
    ): Call<BaseResult<MutableList<CoursewareInfoBean>?>>


    /**
     * 获取课件信息
     */
    @GET("/live/live/getCoursewareInfo")
    fun getCoursewareInfo(@Query("liveId") liveId: String
    ): Call<BaseResult<MutableList<CoursewareInfoBean>?>>

    /**
     * 获取房间内在线人数，拉黑人数，禁言人数(参数房间id)
     */
    @POST("/live/user/liveUserCount")
    fun liveUserCount(@Body params: @JvmSuppressWildcards Map<String, Any>): Call<BaseResult<LoginBean>>

    /**
     * 获取房间内在线人数，拉黑人数，禁言人数(参数房间id)
     */
    @GET("/live/user/getById/{id}")
    fun getById(@Path("id") id: String): Call<BaseResult<LoginBean>>
    /**
     * 查询直播间内用户列表
     */
    @POST("/live/user/pageQuery")
    fun pageQuery(@Body params: @JvmSuppressWildcards Map<String, Any>): Call<PageDataResult<LiveUserBean>>

    /**
     * 停止发放
     */
    @POST("coupon/live/stop")
    fun stop(@Body params: @JvmSuppressWildcards Map<String, Any>): Call<BaseResult<Any>>


    /**
     * 发送消息普通用户
     */
    @POST("/chat/message/send")
    fun send(@Body params: @JvmSuppressWildcards Map<String, Any>): Call<BaseResult<LoginBean>>

    /**
     * 进入房间时获取房间历史消息
     */
    @POST("/chat/message/history")
    fun messageHistory(@Body params: @JvmSuppressWildcards Map<String, Any>): Call<BaseResult<MutableList<MessageBean>>>


    /**
     * 房间历史消息分页
     */
    @POST("/chat/message/msgPage")
    fun messagePage(@Body params: @JvmSuppressWildcards Map<String, Any>): Call<BaseResult<MutableList<MessageBean>>>

    /**
     * 查询抽奖列表
     */
    @POST("/chat/draw/pageQuery")
    fun drawPageQuery(@Body params: @JvmSuppressWildcards Map<String, Any>): Call<PageDataResult<DrawBean>>
    /**
     * 查询抽奖奖品列表
     */
    @POST("/chat/prize/listQuery")
    fun listQuery(@Body params: @JvmSuppressWildcards Map<String, Any>): Call<PageDataResult<DrawBean>>
    /**
     * 发布抽奖
     */
    @POST("/chat/batch/push")
    fun batchPush(@Body params: @JvmSuppressWildcards Map<String, Any>): Call<BaseResult<DrawBean>>
    /**
     * 参与抽奖用户名单（包含是否中奖）
     */
    @POST("/chat/batch/winnerList")
    fun winnerList(@Body params: @JvmSuppressWildcards Map<String, Any>): Call<BaseResult<DrawBean>>

    /**
     * 直播间优惠卷分页 Copy
     */
    @GET("/coupon/back/live/page/{liveId}")
    fun couponList(@Path("liveId") liveId:String): Call<PageDataResult<CouponBean>>
    /**
     * 优惠卷发布
     */
    @POST("/coupon/live/grant")
    fun couponGrant(@Body params: @JvmSuppressWildcards Map<String, Any>): Call<BaseResult<Any>>

    /**
     * 优惠卷发放记录
     */
    @GET("/coupon/live/page")
    fun couponPushList(@Query("liveId") liveId:String ,@Query("pageSize") pageSize:Int,@Query("pageNum") pageNum:Int): Call<PageDataResult<CouponBean>>

    /**
     * 房间中奖用户列表
     */
    @POST("/chat/user/getRoomDrawUserList")
    fun getRoomDrawUserList(@Body params: @JvmSuppressWildcards Map<String, Any>): Call<PageDataResult<LotteryListBean>>

    /**
     * 禁言/解除禁言
     */
    @POST("/live/user/disable")
    fun userDisable(@Body params: @JvmSuppressWildcards Map<String, Any>): Call<BaseResult<Any>>

    /**
     * 踢出直播间/解除提出
     */
    @POST("/live/user/defriend")
    fun userDefriend(@Body params: @JvmSuppressWildcards Map<String, Any>): Call<BaseResult<Any>>

    /**
     *查询直播间内商品（小黄车）列表
     */
    @POST("/chat/liveProducts/pageQuery")
    fun liveProductsPageQuery(@Body params: @JvmSuppressWildcards Map<String, Any>): Call<PageDataResult<liveProductBean>>
    /**
     * 拉黑/解除拉黑
     */
    @POST("/live/user/blacklist")
    fun blacklist(@Body params: @JvmSuppressWildcards Map<String, Any>): Call<BaseResult<Any>>
    /**
     * 直播间商品上/下架
     */
    @POST("/chat/liveProducts/putaway")
    fun liveProductPutaway(@Body params: @JvmSuppressWildcards Map<String, Any>): Call<BaseResult<Any>>

    /**
     *讲解商品
     */
    @POST("/chat/liveProducts/taught")
    fun taught(@Body params: @JvmSuppressWildcards Map<String, Any>): Call<BaseResult<Any>>
    /**
     *取消讲解商品
     */
    @POST("/chat/liveProducts/cancelTaught")
    fun cancelTaught(@Body params: @JvmSuppressWildcards Map<String, Any>): Call<BaseResult<Any>>
    /**
     *点赞
     */
    @POST("/chat/message/like")
    fun like(@Body params: @JvmSuppressWildcards Map<String, Any>): Call<BaseResult<Any>>

    /**
     *获取商品完整目录，（包含章节小节视频） Copy
     */
    @GET("/chat/products/getFullInfo/{productId}")
    fun getFullInfo(@Path("productId") productId :String): Call<BaseResult<ProductDateBean>>

    /**
     *关闭打开小黄车
     */
    @GET("/anchor/live/closeOpenYellowCar")
    fun closeOpenYellowCar(): Call<BaseResult<Any>>
    /**
     *关闭打开礼物特效
     */
    @GET("/anchor/live/closeOpenGiftEffect")
    fun closeOpenGiftEffect(): Call<BaseResult<Any>>
    /**
     *关闭打开打赏
     */
    @GET("/anchor/live/closeOpenTipping")
    fun closeOpenTipping(): Call<BaseResult<Any>>
    /**
     *关闭打开打赏
     */
    @GET("/anchor/page")
    fun anchorPage(@Query("pageNum") pageNum:Int,@Query("pageSize") pageSize:Int ,@Query("liveId")liveId : String): Call<PageDataResult<AnchorBean>>


    /**
     *删除课件
     */
    @POST("/anchor/live/delCourseware")
    fun delCourseware(@Body params: @JvmSuppressWildcards Map<String, Any>): Call<BaseResult<Any>>

    /** type =1
     *获取直播回放详细信息
     */
    @GET("/anchor/live/replay/{id}")
    fun replay(@Path("id") id :String): Call<BaseResult<ReplayBean>>

    /** type =2
     *获取课程内容（视频管理）详细信息
     */
    @GET("/anchor/live/content/{contentId}")
    fun content(@Path("contentId") contentId :String): Call<BaseResult<ReplayBean>>


}